export default {
	getScanData() {
		let obj = ""
		var mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module")
		mpaasScanModule.mpaasScan({
				// 扫码识别类型，参数可多选，qrCode、barCode，不设置，默认识别所有
				'scanType': ['qrCode', 'barCode'],
				// 是否隐藏相册，默认false不隐藏
				'hideAlbum': false
			},
			(ret) => {
				if (ret.resp_result) {
					obj = ret.resp_result.replace(/\s/g, "")
					uni.$emit("barScan",obj)
				} else {
					uni.showToast({
						title: this.$t('topSearch.scanTip'),
						icon: "none",
						duration: 3000
					})
				}
			})
	},
}